package me.zhanshi123.vipsystem.permission.impl;

import cn.nukkit.Player;
import me.zhanshi123.vipsystem.permission.PermissionHandler;
import ru.nukkit.multipass.Multipass;

public class MultiPass implements PermissionHandler {
    @Override
    public void addPlayerGroup(Player player, String group) {
        Multipass.addGroup(player, group);
    }

    @Override
    public void addPlayerGroup(Player player, String group, String world) {
        Multipass.addGroup(world, player.getName(), group);
    }

    @Override
    public void removePlayerGroup(Player player, String group) {
        Multipass.removeGroup(player, group);
    }

    @Override
    public void removePlayerGroup(Player player, String group, String world) {
        Multipass.removeGroup(world, player.getName(), group);
    }

    @Override
    public String getGroup(Player player) {
        return Multipass.getGroup(player);
    }
}
